package com.ag.hmk.action;

import java.util.List;

import com.ag.bean.TbExpertArea;
import com.ag.hmk.service.impl.ExpertAreaServImpl;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author 黄木看
 * 查询专家领域记录action
 */
public class FindExpertAreaAction extends ActionSupport {
	private static final long serialVersionUID = -6903463519312542892L;
	private ExpertAreaServImpl expertAreaServImpl;
	
	private List<TbExpertArea> expareaList; 
	
	/*
	 * 查询所有专家领域记录
	 */
	public String findAll()throws Exception{
		List<TbExpertArea> expAreaList1 = null;
		try {
			expAreaList1 =  expertAreaServImpl.findAllExpArea();
			if (expAreaList1!=null) {
				System.out.println("find all expertarea success!");
			} else {
					System.out.println("not result!");
			}
		} catch (Exception e) {
			e.printStackTrace();
			expAreaList1=null;
			System.out.println("find all expertarea failed!");
		}
		
		this.setExpareaList(expAreaList1);
		return "gerExpAreaOK";
	}

	public void setExpertAreaServImpl(ExpertAreaServImpl expertAreaServImpl) {
		this.expertAreaServImpl = expertAreaServImpl;
	}

	public List<TbExpertArea> getExpareaList() {
		return expareaList;
	}

	public void setExpareaList(List<TbExpertArea> expareaList) {
		this.expareaList = expareaList;
	}

}
